<template>
	<view>
		<u-waterfall v-model="datalist" ref="uWaterfall">
			<template v-slot:left="{leftList}">
				<view class="demo-warter" v-for="(item, index) in leftList" :key="index">
					<view @click="geticardinfo(item.goodsUuid)">
						<icard :icardall="item"></icard>
					</view>
				</view>
			</template>
			<template v-slot:right="{rightList}">
				<view class="demo-warter" v-for="(item, index) in rightList" :key="index">
					<view @click="geticardinfo(item.goodsUuid)">
						<icard :icardall="item"></icard>
					</view>
				</view>
			</template>
		</u-waterfall>
	</view>
</template>

<script>
	import icard from '../icard/icard'
	export default {
		props: ['datalist'],
		components: {
			icard
		},
		data() {
			return {

			}
		},
		methods: {
			//卡片点击
			geticardinfo(uuid) {
				let url = '/pages/subpages/Details/product_details?uuid=' + uuid;
				this.goto(url)
			},
			//页面跳转
			goto(url) {
				uni.navigateTo({
					url: url,
					animationType: 'slide-in-right',
					animationDuration: 1000
			
				})
			},
		}
	}
</script>

<style>
	.demo-warter {
		border-radius: 8px;
		margin: 7rpx;
		background-color: #ffffff;
		position: relative;
		width: ;
	}
</style>
